define([
    'jquery',
    'underscore',
    'backbone',
    'view/backyard/manage/parameter_list',
    'view/backyard/manage/parameter_action',
    'view/backyard/manage/parameter_personnel_list',
    'view/backyard/manage/parameter_personnel_action',
    'text!template/backyard/manage/parameter_item_noremove.html',
    'bootstrap'
], function(
        $,
        _,
        Backbone,
        ParameterListView,
        ParameterActionView,
        ParameterPersonnelListView,
        ParameterPersonnelActionView,
        ItemNoremoveTemplate,
        require
    ){

    var App = Backbone.View.extend({
        el: '#page-backyard-parameter',

        initialize: function() {
            this.render();
        },

        render: function() {

            // Backyard
            new ParameterPersonnelListView();
            new ParameterListView({
                el: '[bb-place-position]', param: 'position'
            });
            new ParameterListView({
                el: '[bb-place-application]', param: 'application'
            });
            new ParameterListView({
                el: '[bb-place-channel]', param: 'channel'
            });
            new ParameterListView({
                el: '[bb-place-group]',
                template: ItemNoremoveTemplate,
                param: 'group'
            });


            new ParameterPersonnelActionView();
            new ParameterActionView({
                el: '[bb-place-position]', param: 'position'
            });
            new ParameterActionView({
                el: '[bb-place-application]', param: 'application'
            });
            new ParameterActionView({
                el: '[bb-place-channel]', param: 'channel'
            });
        }

    });

    new App();
});
